/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Putra
 */
public class VariansUniform implements Varians {

    ParameterUniform parameter;
    
    public VariansUniform(ParameterUniform parameter){
        this.parameter = parameter;
        System.out.println("Varians Distribusi Uniform = "+getVarians());
    }
    
    @Override
    public double getVarians() {
        return Math.pow((parameter.b-parameter.a),2.0)/12;
    }
    
}
